<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
RemoteServiceServlet (Google Web Toolkit Javadoc)
</TITLE>

<META NAME="keywords" CONTENT="com.google.gwt.user.server.rpc.RemoteServiceServlet class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="RemoteServiceServlet (Google Web Toolkit Javadoc)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../com/google/gwt/user/server/rpc/RPC.html" title="class in com.google.gwt.user.server.rpc"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?com/google/gwt/user/server/rpc/RemoteServiceServlet.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="RemoteServiceServlet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.google.gwt.user.server.rpc</FONT>
<BR>
Class RemoteServiceServlet</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by ">javax.servlet.GenericServlet
      <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by ">javax.servlet.http.HttpServlet
          <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.google.gwt.user.server.rpc.RemoteServiceServlet</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicyProvider.html" title="interface in com.google.gwt.user.server.rpc">SerializationPolicyProvider</A>, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>RemoteServiceServlet</B><DT>extends javax.servlet.http.HttpServlet<DT>implements <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicyProvider.html" title="interface in com.google.gwt.user.server.rpc">SerializationPolicyProvider</A></DL>
</PRE>

<P>
The servlet base class for your RPC service implementations that
 automatically deserializes incoming requests from the client and serializes
 outgoing responses for client/server RPCs.
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../serialized-form.html#com.google.gwt.user.server.rpc.RemoteServiceServlet">Serialized Form</A></DL>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#RemoteServiceServlet()">RemoteServiceServlet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default constructor.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc">SerializationPolicy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#doGetSerializationPolicy(javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.String)">doGetSerializationPolicy</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
                         java.lang.String&nbsp;moduleBaseURL,
                         java.lang.String&nbsp;strongName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc"><CODE>SerializationPolicy</CODE></A> for given module base URL and strong
 name if there is one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)">doPost</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
       javax.servlet.http.HttpServletResponse&nbsp;response)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Standard HttpServlet method: handle the POST.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#doUnexpectedFailure(java.lang.Throwable)">doUnexpectedFailure</A></B>(java.lang.Throwable&nbsp;e)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override this method to control what should happen when an exception
 escapes the <A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#processCall(java.lang.String)"><CODE>processCall(String)</CODE></A> method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc">SerializationPolicy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#getSerializationPolicy(java.lang.String, java.lang.String)">getSerializationPolicy</A></B>(java.lang.String&nbsp;moduleBaseURL,
                       java.lang.String&nbsp;strongName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc"><CODE>SerializationPolicy</CODE></A> for a given module base URL and
 serialization policy strong name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;javax.servlet.http.HttpServletRequest</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#getThreadLocalRequest()">getThreadLocalRequest</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>HttpServletRequest</code> object for the current call.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;javax.servlet.http.HttpServletResponse</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#getThreadLocalResponse()">getThreadLocalResponse</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>HttpServletResponse</code> object for the current call.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#onAfterResponseSerialized(java.lang.String)">onAfterResponseSerialized</A></B>(java.lang.String&nbsp;serializedResponse)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override this method to examine the serialized response that will be
 returned to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#onBeforeRequestDeserialized(java.lang.String)">onBeforeRequestDeserialized</A></B>(java.lang.String&nbsp;serializedRequest)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override this method to examine the serialized version of the request
 payload before it is deserialized into objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#processCall(java.lang.String)">processCall</A></B>(java.lang.String&nbsp;payload)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Process a call originating from the given request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#readContent(javax.servlet.http.HttpServletRequest)">readContent</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override this method in order to control the parsing of the incoming
 request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#shouldCompressResponse(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)">shouldCompressResponse</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
                       javax.servlet.http.HttpServletResponse&nbsp;response,
                       java.lang.String&nbsp;responsePayload)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether the response to a given servlet request should or should
 not be GZIP compressed.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.servlet.http.HttpServlet"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class javax.servlet.http.HttpServlet</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.servlet.GenericServlet"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class javax.servlet.GenericServlet</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="RemoteServiceServlet()"><!-- --></A><H3>
RemoteServiceServlet</H3>
<PRE>
public <B>RemoteServiceServlet</B>()</PRE>
<DL>
<DD>The default constructor.
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)"><!-- --></A><H3>
doPost</H3>
<PRE>
public final void <B>doPost</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
                         javax.servlet.http.HttpServletResponse&nbsp;response)</PRE>
<DL>
<DD>Standard HttpServlet method: handle the POST.
 
 This doPost method swallows ALL exceptions, logs them in the
 ServletContext, and returns a GENERIC_FAILURE_MSG response with status code
 500.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>doPost</CODE> in class <CODE>javax.servlet.http.HttpServlet</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getSerializationPolicy(java.lang.String, java.lang.String)"><!-- --></A><H3>
getSerializationPolicy</H3>
<PRE>
public final <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc">SerializationPolicy</A> <B>getSerializationPolicy</B>(java.lang.String&nbsp;moduleBaseURL,
                                                        java.lang.String&nbsp;strongName)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicyProvider.html#getSerializationPolicy(java.lang.String, java.lang.String)">SerializationPolicyProvider</A></CODE></B></DD>
<DD>Returns a <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc"><CODE>SerializationPolicy</CODE></A> for a given module base URL and
 serialization policy strong name.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicyProvider.html#getSerializationPolicy(java.lang.String, java.lang.String)">getSerializationPolicy</A></CODE> in interface <CODE><A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicyProvider.html" title="interface in com.google.gwt.user.server.rpc">SerializationPolicyProvider</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>moduleBaseURL</CODE> - the URL for the module<DD><CODE>strongName</CODE> - strong name of the serialization
          policy for the specified module URL
<DT><B>Returns:</B><DD>a <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc"><CODE>SerializationPolicy</CODE></A> for a given module base URL and RPC
         strong name; must not return <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="processCall(java.lang.String)"><!-- --></A><H3>
processCall</H3>
<PRE>
public java.lang.String <B>processCall</B>(java.lang.String&nbsp;payload)
                             throws <A HREF="../../../../../../com/google/gwt/user/client/rpc/SerializationException.html" title="class in com.google.gwt.user.client.rpc">SerializationException</A></PRE>
<DL>
<DD>Process a call originating from the given request. Uses the
 <A HREF="../../../../../../com/google/gwt/user/server/rpc/RPC.html#invokeAndEncodeResponse(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])"><CODE>RPC.invokeAndEncodeResponse(Object, java.lang.reflect.Method, Object[])</CODE></A>
 method to do the actual work.
 <p>
 Subclasses may optionally override this method to handle the payload in any
 way they desire (by routing the request to a framework component, for
 instance). The <CODE>HttpServletRequest</CODE> and <CODE>HttpServletResponse</CODE>
 can be accessed via the <A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#getThreadLocalRequest()"><CODE>getThreadLocalRequest()</CODE></A> and
 <A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#getThreadLocalResponse()"><CODE>getThreadLocalResponse()</CODE></A> methods.
 </p>
 This is public so that it can be unit tested easily without HTTP.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>payload</CODE> - the UTF-8 request payload
<DT><B>Returns:</B><DD>a string which encodes either the method's return, a checked
         exception thrown by the method, or an
         <A HREF="../../../../../../com/google/gwt/user/client/rpc/IncompatibleRemoteServiceException.html" title="class in com.google.gwt.user.client.rpc"><CODE>IncompatibleRemoteServiceException</CODE></A>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../com/google/gwt/user/client/rpc/SerializationException.html" title="class in com.google.gwt.user.client.rpc">SerializationException</A></CODE> - if we cannot serialize the response
<DD><CODE><A HREF="../../../../../../com/google/gwt/user/server/rpc/UnexpectedException.html" title="class in com.google.gwt.user.server.rpc">UnexpectedException</A></CODE> - if the invocation throws a checked exception
           that is not declared in the service method's signature
<DD><CODE>java.lang.RuntimeException</CODE> - if the service method throws an unchecked
           exception (the exception will be the one thrown by the service)</DL>
</DD>
</DL>
<HR>

<A NAME="doGetSerializationPolicy(javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.String)"><!-- --></A><H3>
doGetSerializationPolicy</H3>
<PRE>
protected <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc">SerializationPolicy</A> <B>doGetSerializationPolicy</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
                                                       java.lang.String&nbsp;moduleBaseURL,
                                                       java.lang.String&nbsp;strongName)</PRE>
<DL>
<DD>Gets the <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc"><CODE>SerializationPolicy</CODE></A> for given module base URL and strong
 name if there is one.
 
 Override this method to provide a <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc"><CODE>SerializationPolicy</CODE></A> using an
 alternative approach.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the HTTP request being serviced<DD><CODE>moduleBaseURL</CODE> - as specified in the incoming payload<DD><CODE>strongName</CODE> - a strong name that uniquely identifies a serialization
          policy file
<DT><B>Returns:</B><DD>a <A HREF="../../../../../../com/google/gwt/user/server/rpc/SerializationPolicy.html" title="class in com.google.gwt.user.server.rpc"><CODE>SerializationPolicy</CODE></A> for the given module base URL and
         strong name, or <code>null</code> if there is none</DL>
</DD>
</DL>
<HR>

<A NAME="doUnexpectedFailure(java.lang.Throwable)"><!-- --></A><H3>
doUnexpectedFailure</H3>
<PRE>
protected void <B>doUnexpectedFailure</B>(java.lang.Throwable&nbsp;e)</PRE>
<DL>
<DD>Override this method to control what should happen when an exception
 escapes the <A HREF="../../../../../../com/google/gwt/user/server/rpc/RemoteServiceServlet.html#processCall(java.lang.String)"><CODE>processCall(String)</CODE></A> method. The default implementation
 will log the failure and send a generic failure response to the client.<p/>
 
 An "expected failure" is an exception thrown by a service method that is
 declared in the signature of the service method. These exceptions are
 serialized back to the client, and are not passed to this method. This
 method is called only for exceptions or errors that are not part of the
 service method's signature, or that result from SecurityExceptions,
 SerializationExceptions, or other failures within the RPC framework.<p/>
 
 Note that if the desired behavior is to both send the GENERIC_FAILURE_MSG
 response AND to rethrow the exception, then this method should first send
 the GENERIC_FAILURE_MSG response itself (using getThreadLocalResponse), and
 then rethrow the exception. Rethrowing the exception will cause it to
 escape into the servlet container.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - the exception which was thrown</DL>
</DD>
</DL>
<HR>

<A NAME="getThreadLocalRequest()"><!-- --></A><H3>
getThreadLocalRequest</H3>
<PRE>
protected final javax.servlet.http.HttpServletRequest <B>getThreadLocalRequest</B>()</PRE>
<DL>
<DD>Gets the <code>HttpServletRequest</code> object for the current call. It
 is stored thread-locally so that simultaneous invocations can have
 different request objects.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getThreadLocalResponse()"><!-- --></A><H3>
getThreadLocalResponse</H3>
<PRE>
protected final javax.servlet.http.HttpServletResponse <B>getThreadLocalResponse</B>()</PRE>
<DL>
<DD>Gets the <code>HttpServletResponse</code> object for the current call. It
 is stored thread-locally so that simultaneous invocations can have
 different response objects.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="onAfterResponseSerialized(java.lang.String)"><!-- --></A><H3>
onAfterResponseSerialized</H3>
<PRE>
protected void <B>onAfterResponseSerialized</B>(java.lang.String&nbsp;serializedResponse)</PRE>
<DL>
<DD>Override this method to examine the serialized response that will be
 returned to the client. The default implementation does nothing and need
 not be called by subclasses.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="onBeforeRequestDeserialized(java.lang.String)"><!-- --></A><H3>
onBeforeRequestDeserialized</H3>
<PRE>
protected void <B>onBeforeRequestDeserialized</B>(java.lang.String&nbsp;serializedRequest)</PRE>
<DL>
<DD>Override this method to examine the serialized version of the request
 payload before it is deserialized into objects. The default implementation
 does nothing and need not be called by subclasses.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readContent(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
readContent</H3>
<PRE>
protected java.lang.String <B>readContent</B>(javax.servlet.http.HttpServletRequest&nbsp;request)
                                throws javax.servlet.ServletException,
                                       java.io.IOException</PRE>
<DL>
<DD>Override this method in order to control the parsing of the incoming
 request. For example, you may want to bypass the check of the Content-Type
 and character encoding headers in the request, as some proxies re-write the
 request headers.  Note that bypassing these checks may expose the servlet to
 some cross-site vulnerabilities.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming request
<DT><B>Returns:</B><DD>the content of the incoming request encoded as a string.
<DT><B>Throws:</B>
<DD><CODE>javax.servlet.ServletException</CODE>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="shouldCompressResponse(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)"><!-- --></A><H3>
shouldCompressResponse</H3>
<PRE>
protected boolean <B>shouldCompressResponse</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
                                         javax.servlet.http.HttpServletResponse&nbsp;response,
                                         java.lang.String&nbsp;responsePayload)</PRE>
<DL>
<DD>Determines whether the response to a given servlet request should or should
 not be GZIP compressed. This method is only called in cases where the
 requester accepts GZIP encoding.
 <p>
 This implementation currently returns <code>true</code> if the response
 string's estimated byte length is longer than 256 bytes. Subclasses can
 override this logic.
 </p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the request being served<DD><CODE>response</CODE> - the response that will be written into<DD><CODE>responsePayload</CODE> - the payload that is about to be sent to the client
<DT><B>Returns:</B><DD><code>true</code> if responsePayload should be GZIP compressed,
         otherwise <code>false</code>.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../com/google/gwt/user/server/rpc/RPC.html" title="class in com.google.gwt.user.server.rpc"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?com/google/gwt/user/server/rpc/RemoteServiceServlet.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="RemoteServiceServlet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
